-- GENERATED SPELL FOR [Decrepit Necromancer] --


function spell0_26942(pUnit, Event) --@Conversion Beam,n/a--
pUnit:FullCastSpellOnTarget(50659,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26942', 10000, 1)
end

function spell1_26942(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26942', 3000, 1)
end

function Sorts_26942(pUnit, Event)
local choix_sorts_26942 = math.random(0, 1)
if choix_sorts_26942 == 0 then
pUnit:RegisterEvent('spell0_26942', 1, 1)
end
if choix_sorts_26942 == 1 then
pUnit:RegisterEvent('spell1_26942', 1, 1)
end
end

function mob26942_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26942', math.random(1500, 3000), 1)
end

function mob26942_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26942_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26942_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26942, 1, 'mob26942_Action')
RegisterUnitEvent(26942, 2, 'mob26942_Leave')
RegisterUnitEvent(26942, 3, 'mob26942_Kill')
RegisterUnitEvent(26942, 4, 'mob26942_Die')
